﻿using System;
using SceneAssist;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using UnityEngine.UI;

namespace Studio
{
	// Token: 0x020005D4 RID: 1492
	public class ThumbnailNode : PointerAction
	{
		// Token: 0x170004AD RID: 1197
		// (get) Token: 0x0600261A RID: 9754 RVA: 0x000E0048 File Offset: 0x000DE248
		public Button button
		{
			get
			{
				return this.m_Button;
			}
		}

		// Token: 0x170004AE RID: 1198
		// (get) Token: 0x0600261B RID: 9755 RVA: 0x000E0050 File Offset: 0x000DE250
		public RawImage image
		{
			get
			{
				return this.m_Image;
			}
		}

		// Token: 0x170004AF RID: 1199
		// (get) Token: 0x0600261D RID: 9757 RVA: 0x000E0068 File Offset: 0x000DE268
		// (set) Token: 0x0600261C RID: 9756 RVA: 0x000E0058 File Offset: 0x000DE258
		public Texture texture
		{
			get
			{
				return this.m_Image.texture;
			}
			set
			{
				this.m_Image.texture = value;
			}
		}

		// Token: 0x170004B0 RID: 1200
		// (get) Token: 0x0600261E RID: 9758 RVA: 0x000E0078 File Offset: 0x000DE278
		// (set) Token: 0x0600261F RID: 9759 RVA: 0x000E0088 File Offset: 0x000DE288
		public bool interactable
		{
			get
			{
				return this.m_Button.interactable;
			}
			set
			{
				this.m_Button.interactable = value;
				this.m_Image.color = ((!value) ? Color.clear : Color.white);
			}
		}

		// Token: 0x170004B1 RID: 1201
		// (set) Token: 0x06002620 RID: 9760 RVA: 0x000E00B8 File Offset: 0x000DE2B8
		public UnityAction addOnClick
		{
			set
			{
				this.m_Button.onClick.AddListener(value);
			}
		}

		// Token: 0x06002621 RID: 9761 RVA: 0x000E00CC File Offset: 0x000DE2CC
		public override void OnPointerEnter(PointerEventData eventData)
		{
			if (!this.interactable)
			{
				return;
			}
			base.OnPointerEnter(eventData);
		}

		// Token: 0x06002622 RID: 9762 RVA: 0x000E00E4 File Offset: 0x000DE2E4
		public virtual void Awake()
		{
			ThumbnailNode.ClickSound clickSound = this.clickSound;
			if (clickSound == ThumbnailNode.ClickSound.OK)
			{
				this.addOnClick = delegate()
				{
					Assist.PlayDecisionSE();
				};
			}
		}

		// Token: 0x04002645 RID: 9797
		[SerializeField]
		protected Button m_Button;

		// Token: 0x04002646 RID: 9798
		[SerializeField]
		private RawImage m_Image;

		// Token: 0x04002647 RID: 9799
		[SerializeField]
		protected ThumbnailNode.ClickSound clickSound;

		// Token: 0x020005D5 RID: 1493
		protected enum ClickSound
		{
			// Token: 0x0400264A RID: 9802
			NoSound,
			// Token: 0x0400264B RID: 9803
			OK
		}
	}
}
